<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>

  <script>
    //  break 跳出当前循环  结束当前循环
    for (var i = 0; i < 10; i++) {
      if (i == 3) {
        break;
      }
      console.log(i)
    }
    // continue 跳出当前循环  继续下一次循环
    for (var x = 0; x < 10; x++) {
      if (x === 3) {
        continue
      }
      console.log(x)
    }

  </script>

</body>

</html>